# Contributor: Celeste <cielesti@protonmail.com>
# Maintainer: Celeste <cielesti@protonmail.com>
pkgname=py3-django-storages
pkgver=1.14.2
pkgrel=0
pkgdesc="Custom storage backends for Django"
url="https://django-storages.readthedocs.io/"
arch="noarch"
license="BSD-3-Clause"
depends="py3-django"
makedepends="
	py3-gpep517
	py3-setuptools
	py3-wheel
	"
checkdepends="
	py3-boto3
	py3-cryptography
	py3-paramiko
	py3-pytest-cov
	py3-rsa
	py3-tox
	"
subpackages="$pkgname-pyc"
source="https://github.com/jschneier/django-storages/archive/$pkgver/py3-django-storages-$pkgver.tar.gz"
builddir="$srcdir/django-storages-$pkgver"

build() {
	gpep517 build-wheel \
		--wheel-dir .dist \
		--output-fd 3 3>&1 >&2
}

check() {
	python3 -m venv --clear --without-pip --system-site-packages .testenv
	.testenv/bin/python3 -m installer .dist/*.whl
	DJANGO_SETTINGS_MODULE=tests.settings \
		.testenv/bin/python3 -m pytest \
			--ignore tests/test_azure.py \
			--ignore tests/test_dropbox.py \
			--ignore tests/test_gcloud.py \
			--ignore tests/test_s3.py
}

package() {
	python3 -m installer -d "$pkgdir" \
		.dist/*.whl
}

sha512sums="
5e1cfdddfde21bde1a0f735ca04e0a1fdf30e779bd63b580610eb7761cf053ad66eb115bb85a966ffa9f8bf2c38927132761eba407749f283cc5511e72267759  py3-django-storages-1.14.2.tar.gz
"
